<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{$title}-{$Think.lang.web_name}</title>
    {include file="comm/header"/}
</head>
<body>
{include file="comm/left_menu"/}
{include file="comm/top_menu"/}
<div class="container main">
    <div class="col-sm-12 border-bottom text-right"><a class="btn btn-primary mgr-10" href="/Models/model_field_list/id/{$model_field._model_id}"><i class="fa fa-list-ul"></i>&nbsp;{$Think.lang.model_field_list}</a></div>

    <div class="col-sm-12">
        <div class="col-sm-12"> &nbsp;</div>
        <form class="form-horizontal" method="post" action="/Models/model_field_save/">

            <div class="form-group">
                <label class="col-sm-3 control-label">{$Think.lang.field_name}</label>
                <div class="col-sm-3">
                    <input class="form-control" name="field_name" value="{$model_field.field_name}" required placeholder="必填">
                </div>
                <small class="col-sm-4 form-tips">字母和下划线</small>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">{$Think.lang.model_table}</label>
                <div class="col-sm-3">
                    <select class="form-control" name="field_pid">
                        <option value="0">{$Think.lang.select}</option>
                        {if isset($model_field_list)}
                        {foreach name="$model_field_list" key="key" id="v" index="i"}
                        <option value="{$v.field_id}" {if in_array($v.field_id,[$model_field.field_pid])} selected{/if}>{$v.field_name}</option>
                        {/foreach}
                        {/if}
                    </select>
                </div>
                <small class="col-sm-4 form-tips"></small>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">{$Think.lang.field_alias}</label>
                <div class="col-sm-3">
                    <input class="form-control" name="field_alias" value="{$model_field.field_alias}" >
                </div>
                <small class="col-sm-4 form-tips"></small>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">{$Think.lang.field_desc}</label>
                <div class="col-sm-3">
                    <input class="form-control" name="field_desc" value="{$model_field.field_desc}" >
                </div>
                <small class="col-sm-4 form-tips"></small>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">{$Think.lang.order}</label>
                <div class="col-sm-3">
                    <input type="number" class="form-control" name="order" value="{if $model_field.order}{$model_field.order}{else}0{/if}" >
                </div>
                <small class="col-sm-4 form-tips"></small>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">{$Think.lang.checked}</label>
                <div class="col-sm-3">
                    <label class="s-label-radio">
                        <input type="radio" name="checked" value="0" id="checked0" {if in_array($model_field.checked,[0])} checked {/if}>
                        <label for="checked0" class="fa fa-check"></label>{$Think.lang.checked_0}
                    </label>
                    <label class="s-label-radio">
                        <input type="radio" name="checked" value="1" id="checked1" {if in_array($model_field.checked,[1])} checked {/if}>
                        <label for="checked1" class="fa fa-check"></label>{$Think.lang.checked_1}
                    </label>
                </div>
                <small class="col-sm-4 form-tips"></small>
            </div>




            <div class="form-group">
                <label class="col-sm-3 control-label"></label>
                <div class="col-sm-3">
                    <input type="hidden" name="field_id" value="{$model_field.field_id}">
                    <input type="hidden" name="token" value="">
                    <button class="btn btn-primary" type="submit">提交保存</button>
                </div>
                <small class="col-sm-4 form-tips"></small>
            </div>

        </form>
    </div>
</div>
{include file="comm/footer"/}
<script type="text/javascript">


</script>
</body>
</html>